﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace OnlineEducation.Data.Entities
{

    /// <summary>
    /// 上课结果
    /// </summary>
    /// <seealso cref="OnlineEducation.Data.Entities.EntityBase" />
    public class LessonRecord : EntityBase
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [ForeignKey("Lesson")]
        public int LessonId { get; set; }
        public Lesson Lesson { get; set; }

        [ForeignKey("Student")]
        public int StudentId { get; set; }

        public ApplicationUser Student { get; set; }

        [Display(Name = "教材")]
        [Required]
        [StringLength(400)]
        public string UsedMaterialURLs { get; set; }

        [Display(Name = "视频")]
        [Required]
        [StringLength(400)]
        public string RecordVideoUrl { get; set; }

        [Display(Name = "作业")]
        [StringLength(5000)]
        public string HomeworkResult { get; set; }

        [Display(Name = "教师评分")]
        public decimal Point { get; set; }

        [Display(Name = "教师评语")]
        public string TutorComment { get; set; }
    }
}
